home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @@;
-
-
- 1.2
- date 92.03.27.12.26.00; author shirriff; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 90.09.06.11.10.15; author shirriff; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @Added include info.
- @
- text
- @.\" Copyright (c) 1983 Regents of the University of California.
- .\" All rights reserved. The Berkeley software License Agreement
- .\" specifies the terms and conditions for redistribution.
- .\"
- .\" @@(#)bstring.3 6.3 (Berkeley) 11/18/87
- .\"
- .TH BSTRING 3 "November 18, 1987"
- .UC 5
- .SH NAME
- bcopy, bcmp, bzero, ffs \- bit and byte string operations
- .SH SYNOPSIS
- .nf
- #include <bstring.h>
- .PP
- .B bcopy(src, dst, length)
- .B char *src, *dst;
- .B int length;
- .PP
- .B bcmp(b1, b2, length)
- .B char *b1, *b2;
- .B int length;
- .PP
- .B bzero(b, length)
- .B char *b;
- .B int length;
- .PP
- .B ffs(i)
- .B int i;
- .fi
- .SH DESCRIPTION
- The functions
- .IR bcopy ,
- .IR bcmp ,
- and
- .I bzero
- operate on variable length strings of bytes.
- They do not check for null bytes as the routines in
- .IR string (3)
- do.
- .PP
- .I Bcopy
- copies
- .I length
- bytes from string
- .I src
- to the string
- .IR dst .
- .PP
- .I Bcmp
- compares byte string
- .I b1
- against byte string
- .IR b2 ,
- returning zero if they are identical,
- non-zero otherwise. Both strings are
- assumed to be
- .I length
- bytes long.
- .B Bcmp
- of
- .I length
- zero bytes always returns zero.
- .PP
- .I Bzero
- places
- .I length
- 0 bytes in the string
- .IR b1 .
- .PP
- \fIFfs\fP finds the first bit set in the argument passed it and returns
- the index of that bit. Bits are numbered starting at 1, from the right.
- A return value of 0 indicates the value passed is zero.
- .SH BUGS
- The
- .I bcopy
- routine take parameters backwards from
- .IR strcpy .
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d13 2
- @
-